module(
    name = "gotopt2",
    version = "2.2.0",
)

bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "gazelle", version = "0.42.0", repo_name = "bazel_gazelle")
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0")
bazel_dep(name = "bazel_bats", version = "0.35.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")

# Go SDK

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.24.1")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")

# All *direct* Go dependencies of the module have to be listed explicitly.
use_repo(
    go_deps,
    "com_github_google_go_cmp",
    "in_gopkg_yaml_v3",
)

# multitool
bazel_dep(name = "rules_multitool", version = "1.9.0")
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
multitool.hub(lockfile = "//:multitool.lock.json")
use_repo(multitool, "multitool")

# rules_shell
bazel_dep(name = "rules_shell", version = "0.6.1")
